namespace PeaceBlogData.Tables
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel.DataAnnotations;
    using System.ComponentModel.DataAnnotations.Schema;
    using System.Data.Entity.Spatial;
    using System.Runtime.Serialization;

    public partial class Posts
    {
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
        public Posts()
        {
            PostStats = new HashSet<PostStats>();
            Categories = new HashSet<Categories>();
            Tags = new HashSet<Tags>();
        }

        [Key]
        public Guid PostID { get; set; }

        [StringLength(200)]
        public string Name { get; set; }

        public string SpecialURL { get; set; }

        public int PostType { get; set; }

        [StringLength(200)]
        public string ShortDescription { get; set; }

        [Column(TypeName = "text")]
        public string PostExtension { get; set; }

        [Column(TypeName = "text")]
        public string Content { get; set; }

        public int? AuthorID { get; set; }

        public int Visible { get; set; }

        public bool IsWork { get; set; }

        [StringLength(70)]
        public string MetaTitle { get; set; }

        [StringLength(160)]
        public string MetaDescription { get; set; }

        [StringLength(200)]
        public string MetaKeywords { get; set; }

        [Column(TypeName = "text")]
        public string SpecialMeta { get; set; }

        public DateTime SaveDate { get; set; }

        public virtual Authors Authors { get; set; }

        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
        public virtual ICollection<PostStats> PostStats { get; set; }

        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
        public virtual ICollection<Categories> Categories { get; set; }

        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
        public virtual ICollection<Tags> Tags { get; set; }
    }
}
